package think.bank;

public class Test {
	public static void main(String[] args) {
		IndividualAccount account = new IndividualAccount("tqq",1000); //创建账户对象
		Bank bank = Bank.getInstance(); //实例化银行对象
		
		
			Thread read = new Thread(()->{
				boolean flag = bank.getMoney(account, 600);
				System.out.println(flag);
				System.out.println(account.getAccount());
			});
			Thread read2 = new Thread(()->{
				boolean flag = bank.getMoney(account, 600);
				System.out.println(flag);
				System.out.println(account.getAccount());
			});
			read.start();
			read2.start();
	}
}
